﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using KerriganDataContract;
using KerriganDataContract.Facture;
using System.Diagnostics;

namespace KerriganService.DAC
{
    public class SessionToPayDAC
    {

        public static List<SessionToPayDC> CopyEntityToBo(List<SessionToPayByCustomer_Result> entities)
        {
            List<SessionToPayDC> bo = new List<SessionToPayDC>();
            try
            {
                foreach (SessionToPayByCustomer_Result entity in entities)
                {
                    bo.Add(CopyEntityToBo(entity));
                }
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex.Message);
            }

            return bo;
        }

        public static SessionToPayDC CopyEntityToBo(SessionToPayByCustomer_Result entity)
        {
            SessionToPayDC bo = new SessionToPayDC();

            try
            {
                bo.IdSession = entity.IdSession;
                bo.Name = entity.Name;
                bo.Price = entity.Price;
                bo.IdFormation = entity.IdFormation;
                bo.Formation = entity.Formation;
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex.Message);
            }

            return bo;
        }
    }
}